allprjs = {
	"GameServer"
}

for _, prj in ipairs(allprjs) do
    project(prj)
    kind "ConsoleApp"
    files {
        prj.."/**.cpp", prj.."/**.c", prj.."/**.h",
    }
	includedirs { ".", "../Framework" }
	
    if os.isfile(prj.."/premake4.lua") then
		local func = loadfile(prj.."/premake4.lua")
		func()
    end
	
    configuration "windows"
        links { "ws2_32", "mswsock", "kernel32", "user32" }
    configuration { "Debug", "vs*" }
        links { "eventd", "wch", "lua", "Framework" }
        if prj == "HallServer" or prj == "GameServer" then
            links { "libmysql", "lib_acl_cpp_vc2012d" }
		end		
    configuration { "Release", "vs*" }
        links { "event", "wch", "lua", "Framework" }
        if prj == "HallServer" or prj == "GameServer" then
            links { "libmysql", "lib_acl_cpp_vc2012" }
        end		
    configuration "not windows"
    	buildoptions { "-std=c++11", "-fpermissive" }
	links { "Framework", "event", "event_pthreads", "mysqlclient", "lua", "dl", "wch", "pthread" }
end

